package app

import (
	"github.com/BurntSushi/toml"
)

type TomlFileCFG struct {

	//http监听的ip及端口
	Http struct {
		ListenIp   string `toml:"listenIp"`
		ListenPort string `toml:"listenPort"`
	} `toml:"http"`

	//系统配置
	System struct {
		Title       string   `toml:"title"`       //
		Description string   `toml:"description"` //
		WhiteIP     []string `toml:"whiteIP"`     //允许访问的IP
	} `toml:"system"`
}

/**
加载配置文件
*/
func (ser *Server) LoadConfig() {
	_, _ = toml.DecodeFile(ser.ConfigFile, &ser.Config)
}
